Skip to main content

All Questions

Tagged with
2votes
2answers
4kviews

Missing header file linux/io_uring.h

#include <linux/io_uring.h> main.c:1:10: fatal error: linux/io_uring.h: No such file or directory #include <linux/io_uring.h> ^~~~~~~~~~~~~~~~~~ Kernel version 5.4.0-80. I ...
fullnitrous's user avatar
1vote
2answers
5kviews

Locating the C header "stdio.h"

I wrote my first C program which is the generic "hello world" program. Could anyone please tell me where can I find stdio.h file in my system? It will help me a lot in understanding of the ...
Ashutosh Mishra's user avatar
0votes
1answer
28views

How does many binaries changes the percent number of the execution in its right place?

I'm trying to write a C program which can do the thing that many binaries such as package managers do in execution time. They change and add to the already outputted texts in terminal and it makes it ...
zbx0310's user avatar
1vote
1answer
7kviews

Get current screen dimensions via Xlib using C

Is there any way to get screen dimensions of a display via Xlib using C? I've tried referring to the X.org docs (https://tronche.com/gui/x/xlib/display/screen-information.html), and it only gives me ...
user396530's user avatar
0votes
1answer
3kviews

How to pass argv arguments to a C program using a file or python script in linux?

I used to be able to pass input to C program by first writing a python script and using pipe to send it to the C program as an input or write the output of python script to a file and just doing r &...
Richard Jones's user avatar
1vote
0answers
136views

Fakeroot on macOS tries to delete system directories

I’m having a problem with fakeroot on macOS. I created a pacman fork. When I’d like to delete a package, pacman tries to delete /usr/ instead of a subdirectory. On Linux, it is working fine, though. ...
oioioi's user avatar
0votes
2answers
1kviews

What was the reason for lseek function to return file descriptors as long integer? [closed]

According to the book Advanced Programming in the Unix Environment :- "The character l in the name lseek means ‘‘long integer.’’ Before the introduction of the off_t data type, the offset argument ...
Shanif Ansari's user avatar
-1votes
2answers
355views

How to deal with C makefiles under the "Unix as IDE" philosophy?

I've been for long using VIM as my main editor and never touched an IDE since. This works great for most of the programming languages on the market. When it comes to C, though, I still fell limited to ...
MaiaVictor's user avatar
2votes
2answers
5kviews

Linux System calls in C on OSX

So I did a quick test and #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main (int argc, char *argv[]) { printf("Hello World\n"); printf("%d\n",...
asky's user avatar
  • 123
0votes
1answer
426views

Can I use LXC library in my c program?

Currently, I am designing a c program that will create multiple container and put different applications into them separately to achieve isolation. Is it possible to leverage LXC library to it? I ...
Xin Li's user avatar
0votes
1answer
20kviews

how to return file descriptor in c [closed]

I am confusing with this. fp=fopen(filename,mode); what is the value fopen() return to fp. is that value is file descriptor integer? is fp called as stream ? if not how to return a stream? ...
ashok's user avatar
2votes
1answer
658views

Can you use LXC through C?

I want to use LXC to 'container' plugins my application is loading. Am I able to do this through C? I have been Googling a lot about it, but there don't seem to be any headers, only scripts that can ...
Jeroen's user avatar
7votes
3answers
6kviews

default wordsize in UNIX/Linux

I was inspecting the preprocessed output of my C program and happened to look at the header file wordsize.h It is located in /usr/include/i386-linux-gnu/bits/wordsize.h the file contains only one ...
ArunMKumar's user avatar
1vote
1answer
418views

How do I keep 'indent' from moving curly braces to the next line?

I have several empty inline function definitions in C++ like so: class C { void foo(){} void bar(){} }; now if I run indent -st -i4 -nut test.cc in order to just fix the indentation I get ...
steffen's user avatar
5votes
2answers
3kviews

Implementing a Unix shell in C: Logging [closed]

I am currently working on implementing my own UNIX shell in C. The basis of the shell is working, you could find the source code here. Right now my next task is to implement a logging feature for the ...
rahmu's user avatar
  • 20.4k

close